<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if (sizeof($pages)>0) {
	echo "<ul>";
	foreach ($pages as $page) {
		echo "<li>";
			if ($page['page_status'] == 1) echo "<a href='/".$page['page_curl'].".html'>".$page['page_title']."</a>"; else echo "&nbsp;";
			if ($page['page_curl'] == 'general-directory') { $d['pages'] = $catalog; $this->load->view('modules/articles/map2', $d); }
			if ($page['page_curl'] == 'news') {
				echo "<ul>";
				foreach ($news as $new) {
					echo "<li><a href='/news/".$new['news_id'].".html'>".$new['news_title']."</a></li>";
				}
				echo "</ul>";
			}
			if (is_array($page['childs'])) {
				$data['pages'] = $page['childs'];
				$this->load->view('modules/articles/map', $data);
			}
		echo "</li>";
	}
	echo "</ul>";
}
?>